﻿// Decompiled with JetBrains decompiler
// Type: Microsoft.InfoCards.DisplayClaim
// Assembly: infocard, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// MVID: 8E14765A-6610-409A-BA36-099A0642905D
// Assembly location: E:\git\ALLIDA\windll\infocard.exe

using System.Collections.Generic;
using System.IO;

namespace Microsoft.InfoCards
{
  internal class DisplayClaim
  {
    private string m_name;
    private List<string> m_value;
    private string m_description;
    private string m_uri;

    public string Name
    {
      get
      {
        return this.m_name;
      }
      set
      {
        this.m_name = value;
      }
    }

    public string Id
    {
      get
      {
        return this.m_uri;
      }
    }

    public DisplayClaim(BinaryReader reader)
    {
      this.Deserialize(reader);
    }

    public DisplayClaim(string name, List<string> value, string description, string uri)
    {
      this.m_name = name;
      this.m_value = value;
      this.m_description = description;
      this.m_uri = uri;
    }

    public void Serialize(BinaryWriter writer)
    {
      Utility.SerializeString(writer, this.m_name);
      writer.Write((uint) this.m_value.Count);
      foreach (string str in this.m_value)
        Utility.SerializeString(writer, str);
      Utility.SerializeString(writer, this.m_description);
      Utility.SerializeString(writer, this.m_uri);
    }

    public void Deserialize(BinaryReader reader)
    {
      this.m_name = Utility.DeserializeString(reader);
      uint num = reader.ReadUInt32();
      for (uint index = 0; index < num; ++index)
        this.m_value.Add(Utility.DeserializeString(reader));
      this.m_description = Utility.DeserializeString(reader);
      this.m_uri = Utility.DeserializeString(reader);
    }
  }
}
